package system

import (
	v1 "server/handler/v1"
	"server/middleware"

	"github.com/gin-gonic/gin"
)

func RegisterUserRoleRoutes(group *gin.RouterGroup) {
	userRoleGroup := group.Group("/user_role")
	handlerApp := v1.NewHandlerApp()
	userRoleGroup.Use(middleware.AuthorizationMiddleware())
	{
		userRoleGroup.POST("/create", handlerApp.UserRolrHandler.CreateUserRoleInfoHandler)
		userRoleGroup.DELETE("/delete/:id", handlerApp.UserRolrHandler.DeleteUserRoleInfoHandler)
		userRoleGroup.PUT("/modify", handlerApp.UserRolrHandler.ModifyUserRoleInfoHandler)
		userRoleGroup.GET("/info/:id", handlerApp.UserRolrHandler.GetUserRoleInfoHandler)
		userRoleGroup.GET("/list", handlerApp.UserRolrHandler.GetUserRoleListHandler)
		userRoleGroup.GET("/page", handlerApp.UserRolrHandler.GetUserRolePageHandler)
	}
}
